import { ApiProperty } from '@nestjs/swagger'

import { IsNumber, IsString } from 'class-validator'

export class HomeCountDto {
  @ApiProperty({ description: '用户统计' })
  @IsNumber()
  userCount: number

  @ApiProperty({ description: '设备统计' })
  @IsNumber()
  deviceCount: number

  @ApiProperty({ description: '数据统计' })
  @IsNumber()
  heatCount: number

  @ApiProperty({ description: '告警统计' })
  @IsNumber()
  alarmCount: number

  @ApiProperty({ description: '呼救统计' })
  @IsNumber()
  sosCount: number
}

export class SportCountDto {
  @ApiProperty({ description: '日期' })
  @IsString()
  date: string

  @ApiProperty({ description: '热量' })
  @IsNumber()
  heat: number

  @ApiProperty({ description: '距离' })
  @IsNumber()
  dist: number
}
